<!-- HTML header for doxygen 1.8.8-->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
    <head>
        <meta http-equiv="X-UA-Compatible" content="IE=edge">
        <!-- For Mobile Devices -->
        <meta name="viewport" content="width=device-width, initial-scale=1">
        <meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
        <meta name="generator" content="Doxygen 1.8.18"/>
        <script type="text/javascript" src="https://code.jquery.com/jquery-2.1.1.min.js"></script>
        <title>HElib: helib::PermNetwork Class Reference</title>
        <!--<link href="tabs.css" rel="stylesheet" type="text/css"/>-->
        <script type="text/javascript" src="dynsections.js"></script>
        <link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
        <link href="doxygen.css" rel="stylesheet" type="text/css" />
        <link href="customdoxygen.css" rel="stylesheet" type="text/css"/>
        <link href='https://fonts.googleapis.com/css?family=Roboto+Slab' rel='stylesheet' type='text/css'>
		<link href="https://fonts.googleapis.com/css2?family=IBM+Plex+Sans:ital,wght@0,100;1,700&family=Merriweather&family=Merriweather+Sans&family=Open+Sans&family=Poppins:ital@1&family=Roboto:ital,wght@0,400;1,300;1,900&display=swap" rel="stylesheet"> 
        <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css">
        <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/js/bootstrap.min.js"></script>
        <link href="jquery.smartmenus.bootstrap.css" rel="stylesheet">
        <script type="text/javascript" src="jquery.smartmenus.js"></script>
        <!-- SmartMenus jQuery Bootstrap Addon -->
        <script type="text/javascript" src="jquery.smartmenus.bootstrap.js"></script>
        <!-- SmartMenus jQuery plugin -->
    </head>
    <body style="font-family: 'Merriweather', serif;">
        <nav class="navbar navbar-default" role="navigation">
            <div class="container">
                <div class="navbar-header">
                    <a class="navbar-brand">HElib Implementing Homomorphic Encryption</a>
                </div>
            </div>
        </nav>
        <div id="top"><!-- do not remove this div, it is closed by doxygen! -->
            <div class="content" id="content">
                <div class="container">
                    <div class="row">
                        <div class="col-sm-12 panel " style="padding-bottom: 15px;">
                            <div style="margin-bottom: 15px;">
<!-- end header part -->
<!-- Generated by Doxygen 1.8.18 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
var searchBox = new SearchBox("searchBox", "search",false,'Search');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(function() {
  initMenu('',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
/* @license-end */</script>
<div id="main-nav"></div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div id="nav-path" class="navpath">
  <ul>
<li class="navelem"><a class="el" href="namespacehelib.html">helib</a></li><li class="navelem"><a class="el" href="classhelib_1_1_perm_network.html">PermNetwork</a></li>  </ul>
</div>
</div><!-- top -->
<div class="header">
  <div class="summary">
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="#friends">Friends</a> &#124;
<a href="classhelib_1_1_perm_network-members.html">List of all members</a>  </div>
  <div class="headertitle">
<div class="title">helib::PermNetwork Class Reference</div>  </div>
</div><!--header-->
<div class="contents">

<p>A full permutation network.  
 <a href="classhelib_1_1_perm_network.html#details">More...</a></p>

<p><code>#include &lt;<a class="el" href="permutations_8h_source.html">permutations.h</a>&gt;</code></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr class="memitem:ac28b4e5256433eb0dd2c51c5de899482"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classhelib_1_1_perm_network.html#ac28b4e5256433eb0dd2c51c5de899482">PermNetwork</a> ()</td></tr>
<tr class="separator:ac28b4e5256433eb0dd2c51c5de899482"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ab95327c63d9e120839d5e224b7baf418"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classhelib_1_1_perm_network.html#ab95327c63d9e120839d5e224b7baf418">PermNetwork</a> (const <a class="el" href="namespacehelib.html#ae0769a209e14d5e1bfd8579072397867">Permut</a> &amp;pi, const <a class="el" href="classhelib_1_1_generator_trees.html">GeneratorTrees</a> &amp;trees)</td></tr>
<tr class="separator:ab95327c63d9e120839d5e224b7baf418"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ac59fb18162d230d08cdf8040a52aa994"><td class="memItemLeft" align="right" valign="top">long&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classhelib_1_1_perm_network.html#ac59fb18162d230d08cdf8040a52aa994">depth</a> () const</td></tr>
<tr class="separator:ac59fb18162d230d08cdf8040a52aa994"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a09257bcc62d95f5c7c1fc9a31ae85c9b"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classhelib_1_1_perm_network.html#a09257bcc62d95f5c7c1fc9a31ae85c9b">buildNetwork</a> (const <a class="el" href="namespacehelib.html#ae0769a209e14d5e1bfd8579072397867">Permut</a> &amp;pi, const <a class="el" href="classhelib_1_1_generator_trees.html">GeneratorTrees</a> &amp;trees)</td></tr>
<tr class="separator:a09257bcc62d95f5c7c1fc9a31ae85c9b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ae7a8e3f59636f1318ed64479dbd7c1e3"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classhelib_1_1_perm_network.html#ae7a8e3f59636f1318ed64479dbd7c1e3">applyToCtxt</a> (<a class="el" href="classhelib_1_1_ctxt.html">Ctxt</a> &amp;c, const <a class="el" href="classhelib_1_1_encrypted_array.html">EncryptedArray</a> &amp;ea) const</td></tr>
<tr class="memdesc:ae7a8e3f59636f1318ed64479dbd7c1e3"><td class="mdescLeft">&#160;</td><td class="mdescRight">Apply network to permute a ciphertext.  <a href="classhelib_1_1_perm_network.html#ae7a8e3f59636f1318ed64479dbd7c1e3">More...</a><br /></td></tr>
<tr class="separator:ae7a8e3f59636f1318ed64479dbd7c1e3"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a4ba09dd7c8426ea252470ca9d9219c02"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classhelib_1_1_perm_network.html#a4ba09dd7c8426ea252470ca9d9219c02">applyToCube</a> (<a class="el" href="classhelib_1_1_hyper_cube.html">HyperCube</a>&lt; long &gt; &amp;v) const</td></tr>
<tr class="memdesc:a4ba09dd7c8426ea252470ca9d9219c02"><td class="mdescLeft">&#160;</td><td class="mdescRight">Apply network to array, used mostly for debugging.  <a href="classhelib_1_1_perm_network.html#a4ba09dd7c8426ea252470ca9d9219c02">More...</a><br /></td></tr>
<tr class="separator:a4ba09dd7c8426ea252470ca9d9219c02"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a0f67515423aedfcefac0970fb724cb0b"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classhelib_1_1_perm_network.html#a0f67515423aedfcefac0970fb724cb0b">applyToPtxt</a> (NTL::ZZX &amp;p, const <a class="el" href="classhelib_1_1_encrypted_array.html">EncryptedArray</a> &amp;ea) const</td></tr>
<tr class="memdesc:a0f67515423aedfcefac0970fb724cb0b"><td class="mdescLeft">&#160;</td><td class="mdescRight">Apply network to plaintext polynomial, used mostly for debugging.  <a href="classhelib_1_1_perm_network.html#a0f67515423aedfcefac0970fb724cb0b">More...</a><br /></td></tr>
<tr class="separator:a0f67515423aedfcefac0970fb724cb0b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ab9c057c00b571e77e5fb1d87d3145c05"><td class="memItemLeft" align="right" valign="top">const <a class="el" href="classhelib_1_1_perm_net_layer.html">PermNetLayer</a> &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classhelib_1_1_perm_network.html#ab9c057c00b571e77e5fb1d87d3145c05">getLayer</a> (long i) const</td></tr>
<tr class="separator:ab9c057c00b571e77e5fb1d87d3145c05"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="friends"></a>
Friends</h2></td></tr>
<tr class="memitem:a414c92ddb59a5b1623e88f00f1e05770"><td class="memItemLeft" align="right" valign="top">std::ostream &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classhelib_1_1_perm_network.html#a414c92ddb59a5b1623e88f00f1e05770">operator&lt;&lt;</a> (std::ostream &amp;s, const <a class="el" href="classhelib_1_1_perm_network.html">PermNetwork</a> &amp;net)</td></tr>
<tr class="separator:a414c92ddb59a5b1623e88f00f1e05770"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>A full permutation network. </p>
</div><h2 class="groupheader">Constructor &amp; Destructor Documentation</h2>
<a id="ac28b4e5256433eb0dd2c51c5de899482"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ac28b4e5256433eb0dd2c51c5de899482">&#9670;&nbsp;</a></span>PermNetwork() <span class="overload">[1/2]</span></h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">helib::PermNetwork::PermNetwork </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

</div>
</div>
<a id="ab95327c63d9e120839d5e224b7baf418"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ab95327c63d9e120839d5e224b7baf418">&#9670;&nbsp;</a></span>PermNetwork() <span class="overload">[2/2]</span></h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">helib::PermNetwork::PermNetwork </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="namespacehelib.html#ae0769a209e14d5e1bfd8579072397867">Permut</a> &amp;&#160;</td>
          <td class="paramname"><em>pi</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="classhelib_1_1_generator_trees.html">GeneratorTrees</a> &amp;&#160;</td>
          <td class="paramname"><em>trees</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

</div>
</div>
<h2 class="groupheader">Member Function Documentation</h2>
<a id="ae7a8e3f59636f1318ed64479dbd7c1e3"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ae7a8e3f59636f1318ed64479dbd7c1e3">&#9670;&nbsp;</a></span>applyToCtxt()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void helib::PermNetwork::applyToCtxt </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="classhelib_1_1_ctxt.html">Ctxt</a> &amp;&#160;</td>
          <td class="paramname"><em>c</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="classhelib_1_1_encrypted_array.html">EncryptedArray</a> &amp;&#160;</td>
          <td class="paramname"><em>ea</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td> const</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Apply network to permute a ciphertext. </p>

</div>
</div>
<a id="a4ba09dd7c8426ea252470ca9d9219c02"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a4ba09dd7c8426ea252470ca9d9219c02">&#9670;&nbsp;</a></span>applyToCube()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void helib::PermNetwork::applyToCube </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="classhelib_1_1_hyper_cube.html">HyperCube</a>&lt; long &gt; &amp;&#160;</td>
          <td class="paramname"><em>v</em></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Apply network to array, used mostly for debugging. </p>

</div>
</div>
<a id="a0f67515423aedfcefac0970fb724cb0b"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a0f67515423aedfcefac0970fb724cb0b">&#9670;&nbsp;</a></span>applyToPtxt()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void helib::PermNetwork::applyToPtxt </td>
          <td>(</td>
          <td class="paramtype">NTL::ZZX &amp;&#160;</td>
          <td class="paramname"><em>p</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="classhelib_1_1_encrypted_array.html">EncryptedArray</a> &amp;&#160;</td>
          <td class="paramname"><em>ea</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td> const</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Apply network to plaintext polynomial, used mostly for debugging. </p>

</div>
</div>
<a id="a09257bcc62d95f5c7c1fc9a31ae85c9b"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a09257bcc62d95f5c7c1fc9a31ae85c9b">&#9670;&nbsp;</a></span>buildNetwork()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void helib::PermNetwork::buildNetwork </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="namespacehelib.html#ae0769a209e14d5e1bfd8579072397867">Permut</a> &amp;&#160;</td>
          <td class="paramname"><em>pi</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="classhelib_1_1_generator_trees.html">GeneratorTrees</a> &amp;&#160;</td>
          <td class="paramname"><em>trees</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Take as input a permutation pi and the trees of all the generators, and prepares the permutation network for this pi </p>

</div>
</div>
<a id="ac59fb18162d230d08cdf8040a52aa994"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ac59fb18162d230d08cdf8040a52aa994">&#9670;&nbsp;</a></span>depth()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">long helib::PermNetwork::depth </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

</div>
</div>
<a id="ab9c057c00b571e77e5fb1d87d3145c05"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ab9c057c00b571e77e5fb1d87d3145c05">&#9670;&nbsp;</a></span>getLayer()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">const <a class="el" href="classhelib_1_1_perm_net_layer.html">PermNetLayer</a>&amp; helib::PermNetwork::getLayer </td>
          <td>(</td>
          <td class="paramtype">long&#160;</td>
          <td class="paramname"><em>i</em></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

</div>
</div>
<h2 class="groupheader">Friends And Related Function Documentation</h2>
<a id="a414c92ddb59a5b1623e88f00f1e05770"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a414c92ddb59a5b1623e88f00f1e05770">&#9670;&nbsp;</a></span>operator&lt;&lt;</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">std::ostream&amp; operator&lt;&lt; </td>
          <td>(</td>
          <td class="paramtype">std::ostream &amp;&#160;</td>
          <td class="paramname"><em>s</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="classhelib_1_1_perm_network.html">PermNetwork</a> &amp;&#160;</td>
          <td class="paramname"><em>net</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">friend</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

</div>
</div>
<hr/>The documentation for this class was generated from the following files:<ul>
<li>/HElib/include/helib/<a class="el" href="permutations_8h_source.html">permutations.h</a></li>
<li>/HElib/src/<a class="el" href="_perm_network_8cpp.html">PermNetwork.cpp</a></li>
</ul>
</div><!-- contents -->
<!-- HTML footer for doxygen 1.8.8-->
<!-- start footer part -->
</div>
</div>
</div>
</div>
</div>
<hr class="footer"/><address class="footer"><small>
Generated by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.18
</small></address>
</body>
        <script type="text/javascript" src="doxy-boot.js"></script>
</html>
